import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [vue()],
  server: {
    cors: true,
    open: true,
    proxy: {
      '/v1/api': {
          target: 'http://asxsyd92.com',   //代理接口
          changeOrigin: true,
          rewrite: (path) => path.replace(/^\/api/, 'api')
      },
      '/asxsyd92upload': {
        target: 'http://asxsyd92.com',   //代理接口
        changeOrigin: true,
        rewrite: (path) => path.replace(/^\/api/, 'api')
    }
    }
}
})
